package com.water.app.Impl.comment;

import com.water.app.comment;
import com.water.app.interfaces.comment.CommentService;
import com.water.app.mapper.commentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {
    @Autowired
    private commentMapper commentMapper;
    @Override
    public boolean postComment(int userId, int goodsId, String comment) {
        return commentMapper.postComment(userId,goodsId,comment)>0;
    }

    @Override
    public List<comment> selectComment(int goodsId) {
        return commentMapper.selectComment(goodsId);
    }
}
